package com.jyxd.web.data.patient;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "p_patient_exchange_record")
@Data
@ApiModel("患者流转交互记录")
@TableName("p_patient_exchange_record")   //mybatis-plus标识哪张表
public class PatientExchangeRecord {

    /**
     * 主键ID
     */
    @Id
    @Column(name = "id", length = 32, nullable = false)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid.hex")
    private String id;

    @ApiModelProperty("患者id")
    @Column(name = "patient_id")
    private String patientId;

    @ApiModelProperty("流转key, 入院，手术，转科，换床，出院（/死亡）")
    @Column(name = "code")
    private String code;

    @ApiModelProperty("流转内容")
    @Column(name = "content")
    private String content;

    @ApiModelProperty("状态")
    @Column(name = "status")
    private String status;

    @ApiModelProperty("更新时间")
    @Column(name = "update_time")
    private Date updateTime;

    @ApiModelProperty("创建时间")
    @Column(name = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
}
